<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/25
 * Time: 8:22
 */


class myException extends Exception{
    public function getAllInfo()
    {
        return "异常发生信息为：{$this->getMessage()}";
    }
}
try{
    $x=new myException("发生错误了!");
        throw $x;
}catch(myException $e){
    echo 'a';
   // echo $e->getAllInfo();
    echo 'b';
}
catch(Exception $e){
    echo 'c';
   // echo $e->getAllInfo();
    echo 'd';
}